function [rc,hObject, eventdata, handles] = loadsif3(hObject, eventdata, ...
    handles, file, path, saveyn)

% [rc] = loadsif3(hObject, eventdata, handles, file, path, saveyn)
%
% INPUT:        file        : filename w/o extension
%               path        : full path to filename
%               saveyn      : 1 = save data
%               
% OUTPUT:       rc          : Return code (0 = success)

% Help if called without argument
if nargin<6,
    help loadsif3
    return
end


% Status Bar INIT
[pathstr, name, ext] = fileparts(file);
datasetname = fullfile(pathstr,name);
handles.pathstr = pathstr;
handles.file = file;
handles.ext = ext;
handles.name = name;
handles.filename = datasetname;
handles.path = path;

diary off                   % suspend logging for SIF reader
[rc] = loadsif_nonGUI(datasetname, saveyn);
diary on

% updates the STATUS BAR in SLS-APE
% c = [name,ext,' loaded.']           % Commanline output
% set(handles.FileLoaded,'ForegroundColor',[0.2 0.8 0.4]);
% set(handles.FileLoaded,'String',c);
% plot(handles.axes1, datax, datay);
% guidata(hObject, handles);          % Updates the GUI handles




